﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AspNetInfo.Core;
using System.Data;
using AspNetInfo.Detectors;

namespace AspNetInfo.SampleDetectorPlugin
{
    public class StorageDetector : IDetector
        {

            public string Name
            {
                get { return "Storage"; }
            }

            public string Description
            {
                get { return string.Empty; }
            }

            public string TabName
            {
                get { return Tabs.General; }
            }

            public DataTable Detect(EnvironmentPermissions permissions)
            {
                var dt = DetectorHelper.MakeResultTable();
                if (permissions.TrustLevel > AspNetHostingPermissionLevel.Medium)
                {
                    dt.Rows.Add("Web App Path", HttpContext.Current.Server.MapPath("~"));
                }
                return dt;
            }

        }

}
